package com.chance.cc.crawler.prod.command.schedule.vm.autohome;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.geely.AutoHomeForumGeelyReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.realtime.AutoHomeWebCheArticleCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.realtime.AutoHomeWebCheVideoCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.autohome.trace.AutoHomeWebForumReplyTraceCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.schedule.CommonCrawlerJobSchedule;
import org.junit.Test;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-09 16:15:28
 * @email okprog@sina.com
 */
public class AutoHomeCommonCrawlerJobSchedule extends CommonCrawlerJobSchedule {


    public static void main(String[] args) {

////        autoHomeCommonCrawlerScheduleJob(AutoHomeWebArticleCrawlerScheduleJob.autoHomeScheduler());//实时停止采集
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebArticleTraceCrawlerScheduleJob.autoHomeScheduler());
//
////        autoHomeCommonCrawlerScheduleJob(AutoHomeWebVideoCrawlerScheduleJob.autoHomeScheduler());//实时停止采集
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebVideoTraceCrawlerScheduleJob.autoHomeScheduler());
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebForumReplyTraceCrawlerScheduleJob.autoHomeScheduler());//最新回复

//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebForumReleaseTraceCrawlerSchedulerJob.autoHomeScheduler());//最新发布
//
////        autoHomeCommonCrawlerScheduleJob(AutoHomeWebForumReleaseCrawlerScheduleJob.autoHomeScheduler());//实时停止采集
//
////        autoHomeCommonCrawlerScheduleJob(AutoHomeWebPraiseCrawlerScheduleJob.autoHomeScheduler());//实时停止采集
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebPraiseTraceCrawlerScheduleJob.autoHomeScheduler());
//
        autoHomeCommonCrawlerScheduleJob(AutoHomeWebCheArticleCrawlerScheduleJob.autoHomeScheduler());
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebCheArticleTraceCrawlerScheduleJob.autoHomeScheduler());
//
        autoHomeCommonCrawlerScheduleJob(AutoHomeWebCheVideoCrawlerScheduleJob.autoHomeScheduler());
//
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebCheVideoTraceCrawlerScheduleJob.autoHomeScheduler());
//
////        delCrawlerScheduleJob(AutoHomeWebForumReplyCrawlerScheduleJob.autoHomeScheduler());
//        autoHomeCommonCrawlerScheduleJob(AutoHomeWebForumReplyTraceCrawlerScheduleJob.autoHomeScheduler(), device_name_1);
        //3h  15线程   2021-10-29 17:45:53-2021-10-29 19:45
        //按回复时间排序  29号数据 vm_auto_comment/2021/10/29和2021/10/30 补采文件中
        //30号数据  30号文件夹和31号文件夹

        //汽车之家口碑周度采集
//        autoHomeCommonCrawlerScheduleJob(AutoHomePraiseArticleZdCrawlerSchedulerJob.autoHomeScheduler());

   //吉利项目 220服务器
        autoHomeCommonCrawlerScheduleJob(AutoHomeForumGeelyReleaseCrawlerSchedulerJob.autoHomeScheduler());
     //   autoHomeCommonCrawlerScheduleJob(AutoHomeForumGeelyTraceCrawlerSchedulerJob.autoHomeScheduler());

    }

    public static void autoHomeCommonCrawlerScheduleJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_17.republishCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_6);
    }

    public static void autoHomeCommonCrawlerScheduleJob(CrawlerJob crawlerJob,String device_name){
        crawlerJobScheduleCommand_17.republishCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name);
    }

    public static void delCrawlerScheduleJob(CrawlerJob crawlerJob){
        crawlerJobScheduleCommand_17.deleteCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name_6);
    }

    public static void delCrawlerScheduleJob(CrawlerJob crawlerJob,String device_name){
        crawlerJobScheduleCommand_17.deleteCrawlerJob(crawlerJob.generateCrawlerTriggerKey(),device_name);
    }

    @Test
    public void delJob(){
//        delCrawlerScheduleJob(AutoHomeWebArticleCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebVideoCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebForumReleaseCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebPraiseCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebCheArticleCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebCheVideoCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebForumReleaseCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeWebForumReplyTraceCrawlerScheduleJob.autoHomeScheduler());
//        delCrawlerScheduleJob(AutoHomeForumReleaseSimpleCrawlerSchedulerJob.autoHomeScheduler());
//        crawlerJobScheduleCommand_17.deleteCrawlerJob("autohome-forum_release-interaction-realtime-cron",device_name_6);
    }

    @Test
    public void simpleJob(){
//        autoHomeCommonCrawlerScheduleJob(AutoHomeForumReleaseSimpleCrawlerSchedulerJob.autoHomeScheduler(),device_name_1);
//        autoHomeCommonCrawlerScheduleJob(AutoHomeForumReplySimpleCrawlerSchedulerJob.autoHomeScheduler(),device_name_1);
    }

}
